package com.flowable.controller;

import com.flowable.service.LeaveService;
import org.springframework.http.MediaType;
import org.springframework.web.bind.annotation.*;

import javax.annotation.Resource;

/**
 * 长沙先飞信息科技有限公司<br>
 * Created with IntelliJ IDEA.<br>
 * Date:2024/7/8<br>
 * Time:13:08<br>
 * 功能描述：<br>
 *
 * @author huang hou chun
 * @since JDK 1.8 <br>
 * Copyright (c) 2023 www.csxfrj.com System Incorporated All Rights Reserved.
 */
@RestController
@RequestMapping("/leave")
public class LeaveController {

    @Resource
    private LeaveService leaveService;

    @PostMapping("/start")
    public void startLeave() {
        leaveService.startProcess();
    }

    @GetMapping(value = "/complete", produces = MediaType.APPLICATION_JSON_VALUE)
    public void complete(@RequestParam String groupName) {
        leaveService.complete(groupName);
    }
}
